#ifndef __MESSAGE__
#define __MESSAGE__
#include "util.hpp"
#include "level.hpp"
#include <thread>

namespace bitlog
{
    class LogMsg
    {
    public:
        using ptr = std::shared_ptr<LogMsg>;

        size_t _line;
        size_t _ctime;
        std::thread::id _tid;
        std::string _name;
        std::string _file;
        std::string _payload;
        LogLeval::value _level;
        LogMsg(std::string& name,std::string& file,size_t line,std::string& payload,
        LogLeval::value level)
        :_name(name)
        ,_file(file)
        ,_line(line)
        ,_payload(payload)
        ,_level(level)
        ,_ctime(DateUtil::now())
        ,_tid(std::this_thread::get_id())
        {}
    };
} 



#endif